home *** CD-ROM | disk | FTP | other *** search
/ Macademic for Students & Teachers / Macademic for Students and Teachers (Quantum Leap)(1992).iso / Fun & Games / BashBB / BashBB next >
Text File  |  1985-10-21  |  2KB  |  95 lines

  1. /*                 Planes version 0.1  --  Created by A-Team™  1/5/85      */
  2. /*                    { Fred Huxham, Dave Burnard & Jim Takatsuka   }                    */
  3. /*                                { & Peter X. Moore - resident C jock }                                      */
  4. /*                                    ateam%amber@Berkeley.ARPA                                           */
  5.  
  6. /*                 created using Consulair Mac C Development System                  */
  7. /*                                                                        &                                                                                                                                                               */
  8. /*                                    Apple Macintosh Development System                                                                */
  9.  
  10. #include "maccdefs.h"
  11. #include "Quickdraw.h"
  12. #include "Window.h"
  13. #include "Events.h"
  14. #include "Control.h"
  15.  
  16. #define     NIL 0        
  17. #define    FALSE     0        
  18. #define    TRUE 0xFF
  19.  
  20.  
  21. main()
  22. {
  23. EventRecord event;
  24. short windowcode;
  25. WindowPtr thewindow;
  26. CursHandle thecursor;
  27. Rect icon1,icon2,icon3,icon4;
  28. Handle ibm;
  29.  
  30.  
  31. SetRect(&screen,0,0,512,342);
  32. SetRect(&icon1,100,100,132,132);
  33. EraseRect(&screen);
  34.  
  35. thecursor=GetCursor(1962);
  36. ibm=GetIcon(1962);
  37.  
  38. PlotIcon(&icon1,ibm);
  39. SetCursor(thecursor);
  40.  
  41. while (0xFF)
  42.     {
  43.  
  44.     if (GetNextEvent(everyEvent,&event))
  45.         {
  46.         switch (event.what)
  47.             {
  48.             case mouseDown:
  49.                 {
  50.                 windowcode=FindWindow(&event.where,&thewindow);
  51.                 i=0;
  52.                 switch (windowcode)
  53.                     {
  54.                     case inDesk:
  55.                         {
  56.                         break;
  57.                         }   /* end of case inDesk */
  58.                     case inMenuBar:
  59.                         {
  60.                         break;
  61.                         }   /* end of case inMenuBar */
  62.                     case inSysWindow:
  63.                         {
  64.                         break;
  65.                         }   /* end of case inSysWindow */
  66.                     case inContent:
  67.                         {
  68.                         break;
  69.                         }   /* end of case inContent */
  70.                     case inDrag:
  71.                         {
  72.                         break;
  73.                         }   /* end of case inDrag */
  74.                     case inGrow:
  75.                         {
  76.                         break;
  77.                         }   /* end of case inGrow */
  78.                     case inGoAway:
  79.                         {
  80.                         break;
  81.                         }   /* end of case inGoAway */
  82.                     }   /* end of switch(windowcode) */
  83.                 break;
  84.                 }   /* end of case mouseDown */
  85.             case keyDown:
  86.                 {
  87.                 ExitToShell();
  88.                 break;
  89.                 }   /* end of case keyDown */
  90.             case nullEvent:
  91.             
  92.             }    /* end of switch(event.what) */
  93.         }    /* end of if(GetNext...) */
  94.     }    /* end of while(0xFF) */
  95. }   /* end of main() */